from django.contrib import admin
from django.urls import path
from django.conf.urls.static import static
from django.conf import settings
from web.views import pc as views_pc
from web.apis import ToolsUpdate
from web.apis.TengXunYuanBao import JiChuBan as TengXunYuanBao_JiChuBan_api, Image as TengXunYuanBao_Image_api, FileOperate as TengXunYuanBao_FileOperate_api
urlpatterns = [
    path('web/pc/template/', views_pc.template_view),
    path('web/pc/index/', views_pc.index_view),
    path('', views_pc.template_view),
    path('text/', views_pc.test_view),
    path('web/pc/generate_images/', views_pc.generate_images_view),
    path('web/pc/generate_images/tengxunyuanbao/', views_pc.generate_images_tengxunyuanbao_view), # 腾讯元宝 图像生成

    path('api/system/ToolsUpdate/upload_img/', ToolsUpdate.upload_img), # 系统api:上传图片
    path('api/system/ToolsUpdate/upload_file/', ToolsUpdate.upload_file), # 系统api:上传文件
    # api
    path('api/TengXunYuanBao/get_model/', TengXunYuanBao_JiChuBan_api.get_model), # 腾讯元宝获取模型
    path('api/TengXunYuanBao/JiChuBan/create_new_chat/', TengXunYuanBao_JiChuBan_api.create_new_chat), # 腾讯元宝创建新对话
    path('api/TengXunYuanBao/JiChuBan/send_message/', TengXunYuanBao_JiChuBan_api.send_message), # 腾讯元宝发送消息
    path('api/TengXunYuanBao/Image/get_style/', TengXunYuanBao_Image_api.get_style), # 腾讯元宝获取风格
    path('api/TengXunYuanBao/Image/create_img/', TengXunYuanBao_Image_api.generate_image), # 腾讯元宝生成图片
    path('api/TengXunYuanBao/Image/remove_watermark/', TengXunYuanBao_Image_api.remove_watermark), # 腾讯元宝去除水印
    path('api/TengXunYuanBao/Image/sharpen/', TengXunYuanBao_Image_api.sharpen), # 腾讯元宝变清晰
    path('api/TengXunYuanBao/file/update_file/', TengXunYuanBao_FileOperate_api.upload_file), # 腾讯元宝 上传文件
    
]
# 添加媒体文件URL配置
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
